package com.cinema.data;

import java.io.Serializable;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

@PersistenceCapable
public class User implements Serializable{
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key ID;
	
	@Persistent(valueStrategy = IdGeneratorStrategy.SEQUENCE)
	private Long uID;
	
	@Persistent
	private String username;
	
	@Persistent
	private String password;
	
	@Persistent
	private String email;
	
	@Persistent
	private int age;
	
	@Persistent
	private String fullname;
	
	@Persistent
	private String sex;
	
	@Persistent
	private String phoneno;
	
	
	public User(){}
	
	public User(String username, String password, String email, int age, String fullname, String sex, String phoneno){
		this.username = username;
		this.password = password;
		this.email = email;
		this.setAge(age);
		this.setFullname(fullname);
		this.setSex(sex);
		this.setPhoneno(phoneno);
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}

	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}

	public Key getID() {
		return ID;
	}

	public void setID(Key iD) {
		ID = iD;
	}

	public long getuID() {
		return uID;
	}

	public void setuID(Long uID) {
		this.uID = uID;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public String getFullname() {
		return fullname;
	}

	public void setFullname(String fullname) {
		this.fullname = fullname;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getPhoneno() {
		return phoneno;
	}

	public void setPhoneno(String phoneno) {
		this.phoneno = phoneno;
	}
}
